package com.jeeplus.modules.guide.service;

import com.jeeplus.common.utils.DateUtils;
import com.jeeplus.database.datasource.annotation.DS;
import com.jeeplus.modules.guide.mapper.MobilePublicSecurityMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.Map;

@DS("gxga")
@RequiredArgsConstructor
@Service
@Slf4j
public class MobilePublicSecurityService {
    private final MobilePublicSecurityMapper mobilePublicSecurityMapper;

    /**
     * 获取排队取号办理开始时间
     *jxy
     * @returnid
     */
    public Map<String,Object> getStartTime(String number){
        return mobilePublicSecurityMapper.getStartTime(DateUtils.formatDate(new Date(), DateUtils.PATTERN_YYYYMMDD),number);
    }
    /**
     * 获取排队取号办理结束时间
     *jxy
     * @returnid
     */
    public Map<String,String> getEndTime( String number){
        return mobilePublicSecurityMapper.getEndTime(DateUtils.formatDate(new Date(), DateUtils.PATTERN_YYYYMMDD),number);
    }
}
